In video game applications and the like computer-generated images are used for rendering a 3-D scene. For this purpose 3-D graphics cards are used. A common technique for adding realism to synthetic images without adding a lot of geometry is texture mapping. In texture mapping an object surface is computed as being composed of a plurality of geometric primitives, like polygons. A texture is cast onto the geometric object surface by filling the geometric primitives, like polygons, building up object surface.
Recently real-time 3-D graphics cards with bump mapping have become commonly available. Bump mapping is a technique used in advanced shading applications for simulating the effect of light reflecting from small perturbations across a surface. Bump mapping adds per-pixel surface relief shading, increasing the apparent complexity of the surface.
A bump map is an array of values that represent an object's height variations on a small scale. A custom renderer is used to map these height values into changes in the local surface normal. These perturbed normals are combined with the surface normal, and the results are used to evaluate the lighting equation at each pixel. For accurate bump mapping the light source direction must be rotated into a so-called tangent space having three perpendicular axes, one of them being a normal vector perpendicular to the local surface. If the surface is curved, the tangent space orientation changes at every point on the surface. In order to create a tangent space for a surface, it must be mapped parametrically, which can be achieved easily when the object surface is generated from simple geometric primitives, e.g. polygons. Thus the light source must be rotated into tangent space at each vertex of a polygon. Computing the necessary rotation matrices requires substantial computing power.
A further problem associated with bump mapping of the above kind is that the complexity and total computing time required for the rendering process increases drastically with the total number of light sources illuminating the computer graphics image to be rendered.
A related method of the above kind for shading an object surface where bump mapping is performed either in tangent space or in object space is disclosed in U.S. Pat. No. 5,880,736.
At present, 3-D graphics cards with bump mapping are still not fast enough for more sophisticated lighting algorithms. Thus, at present rendering high quality 3-D graphics images is a compromise between using either fast high quality precalculated static lighting without bump maps and specular highlights on the one hand or slow dynamic low quality lighting but with bump maps and specular highlights on the other hand. What is required, are therefore high-speed rendering methods for realistic rendering of 3-D computer graphics images.
One problem that is particularly addressed by the present invention is computing lighting conditions for a computer graphics image of a scene where a plurality of light sources are present illuminating the scene to be rendered. Approaches according to the prior art directed to approximating such a lighting condition include polynomial texture maps and computing diffuse lighting conditions using spherical harmonics. However, with these approaches the computing time necessary to appropriately approximate the actual lighting condition is substantially increased. Thus, there exists a need for approximating complex lighting situations in an efficient and economic manner.